package com.zj.common.status;



public enum PkStatus {


    First("0","发起请求"),
    FirstErro("1","发起错误"),
    FirstSuccess("2","发起成功"),
    Succeess("3","查询成功");

    private String key;
    private String value;

    private PkStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static PkStatus parse(String key) {
    	PkStatus[] areas= PkStatus.values();
        for(PkStatus a:areas){
            if(a.getKey().equals(key)){
                return a;
            }
        }
        return null;
    }

    public static PkStatus parseValue(String value) {
    	PkStatus[] areas= PkStatus.values();
        for(PkStatus a:areas){
            if(a.getValue().equals(value)){
                return a;
            }
        }
        return null;
    }

}
